<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TDialog类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_t_dialog.html">TDialog</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classawtk_1_1_t_dialog-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TDialog类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.TDialog 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_t_dialog.png" usemap="#awtk.TDialog_map" alt=""/>
  <map id="awtk.TDialog_map" name="awtk.TDialog_map">
<area href="classawtk_1_1_t_window_base.html" alt="awtk.TWindowBase" shape="rect" coords="0,56,120,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aa4e0d881fdabeca969da9baecc583209"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#aa4e0d881fdabeca969da9baecc583209">TDialog</a> (long nativeObj)</td></tr>
<tr class="separator:aa4e0d881fdabeca969da9baecc583209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a762db42dcaceb3ca0b0eb14a714f80"><td class="memItemLeft" align="right" valign="top">TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a5a762db42dcaceb3ca0b0eb14a714f80">getTitle</a> ()</td></tr>
<tr class="separator:a5a762db42dcaceb3ca0b0eb14a714f80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fc62fe1eab528c18b10d6140085b22b"><td class="memItemLeft" align="right" valign="top">TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a9fc62fe1eab528c18b10d6140085b22b">getClient</a> ()</td></tr>
<tr class="separator:a9fc62fe1eab528c18b10d6140085b22b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8894dddeebf0bac173d3e03fcdd05cd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a8894dddeebf0bac173d3e03fcdd05cd1">setTitle</a> (String title)</td></tr>
<tr class="separator:a8894dddeebf0bac173d3e03fcdd05cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac55fd4ece3cfc03be8e14abc57b86248"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_dialog_quit_code.html">TDialogQuitCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#ac55fd4ece3cfc03be8e14abc57b86248">modal</a> ()</td></tr>
<tr class="separator:ac55fd4ece3cfc03be8e14abc57b86248"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17e9f44f1a1cd341ef54b1fd53731aa1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a17e9f44f1a1cd341ef54b1fd53731aa1">quit</a> (int code)</td></tr>
<tr class="separator:a17e9f44f1a1cd341ef54b1fd53731aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bbe15f7435fec3a6dc747bef123070d"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a3bbe15f7435fec3a6dc747bef123070d">isQuited</a> ()</td></tr>
<tr class="separator:a3bbe15f7435fec3a6dc747bef123070d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63f9cfcb94b459737eb7a6af21b3510f"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a63f9cfcb94b459737eb7a6af21b3510f">isModal</a> ()</td></tr>
<tr class="separator:a63f9cfcb94b459737eb7a6af21b3510f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e6997c8ced06aad1f63b0f021844cfd"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a7e6997c8ced06aad1f63b0f021844cfd">getHighlight</a> ()</td></tr>
<tr class="separator:a7e6997c8ced06aad1f63b0f021844cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classawtk_1_1_t_window_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classawtk_1_1_t_window_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classawtk_1_1_t_window_base.html">awtk.TWindowBase</a></td></tr>
<tr class="memitem:a3d4fd3b3e59eca66364479f9c5906a29 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a3d4fd3b3e59eca66364479f9c5906a29">TWindowBase</a> (long nativeObj)</td></tr>
<tr class="separator:a3d4fd3b3e59eca66364479f9c5906a29 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24cb966e157b59f469fa7f1f5431d3c6 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a24cb966e157b59f469fa7f1f5431d3c6">getTheme</a> ()</td></tr>
<tr class="separator:a24cb966e157b59f469fa7f1f5431d3c6 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0d84a5b2ce43209922d729b8f8ade27 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_window_closable.html">TWindowClosable</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#ab0d84a5b2ce43209922d729b8f8ade27">getClosable</a> ()</td></tr>
<tr class="separator:ab0d84a5b2ce43209922d729b8f8ade27 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a193dabf21287b64804fa5f9ae52a1f6e inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a193dabf21287b64804fa5f9ae52a1f6e">getOpenAnimHint</a> ()</td></tr>
<tr class="separator:a193dabf21287b64804fa5f9ae52a1f6e inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acede02ea7c1e70ff9bf14c3d766c2386 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#acede02ea7c1e70ff9bf14c3d766c2386">getCloseAnimHint</a> ()</td></tr>
<tr class="separator:acede02ea7c1e70ff9bf14c3d766c2386 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd210a5db397c8ee2438a20a765ee0aa inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#abd210a5db397c8ee2438a20a765ee0aa">getMoveFocusPrevKey</a> ()</td></tr>
<tr class="separator:abd210a5db397c8ee2438a20a765ee0aa inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004e116aa08d5ad894f1cafd94e85e95 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a004e116aa08d5ad894f1cafd94e85e95">getMoveFocusNextKey</a> ()</td></tr>
<tr class="separator:a004e116aa08d5ad894f1cafd94e85e95 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04b91556cf8a320e63f32f0ac11277b0 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a04b91556cf8a320e63f32f0ac11277b0">getMoveFocusUpKey</a> ()</td></tr>
<tr class="separator:a04b91556cf8a320e63f32f0ac11277b0 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d7c7fd375865484d4feb15f170460c9 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#a3d7c7fd375865484d4feb15f170460c9">getMoveFocusDownKey</a> ()</td></tr>
<tr class="separator:a3d7c7fd375865484d4feb15f170460c9 inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8ddbc34d7f9557f5ad3b4a7256eb4cd inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#ac8ddbc34d7f9557f5ad3b4a7256eb4cd">getMoveFocusLeftKey</a> ()</td></tr>
<tr class="separator:ac8ddbc34d7f9557f5ad3b4a7256eb4cd inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9a4ad1efb4881c319a8c7dc3107ee3d inherit pub_methods_classawtk_1_1_t_window_base"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_window_base.html#aa9a4ad1efb4881c319a8c7dc3107ee3d">getMoveFocusRightKey</a> ()</td></tr>
<tr class="separator:aa9a4ad1efb4881c319a8c7dc3107ee3d inherit pub_methods_classawtk_1_1_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ab600248f7bf4697d03fdf3f00dcae6bb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_dialog.html">TDialog</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#ab600248f7bf4697d03fdf3f00dcae6bb">cast</a> (long nativeObj)</td></tr>
<tr class="separator:ab600248f7bf4697d03fdf3f00dcae6bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb6bbc022b393387d96ef8492db99bc3"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#aeb6bbc022b393387d96ef8492db99bc3">create</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:aeb6bbc022b393387d96ef8492db99bc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09f45b044edc5f4300f98a6ca6898ae1"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a09f45b044edc5f4300f98a6ca6898ae1">createSimple</a> (TWidget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a09f45b044edc5f4300f98a6ca6898ae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad51f882dcaf3eb37db8e7e10cf9ca15"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_dialog.html">TDialog</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#aad51f882dcaf3eb37db8e7e10cf9ca15">cast</a> (TWidget widget)</td></tr>
<tr class="separator:aad51f882dcaf3eb37db8e7e10cf9ca15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc8d72e861710f57909fa0802e54f594"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#adc8d72e861710f57909fa0802e54f594">open</a> (String name)</td></tr>
<tr class="separator:adc8d72e861710f57909fa0802e54f594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa247ffd5f1820806965223678c07a5f0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#aa247ffd5f1820806965223678c07a5f0">toast</a> (String text, int duration)</td></tr>
<tr class="separator:aa247ffd5f1820806965223678c07a5f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4580f5db72d947a6e282dd7543bba14e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a4580f5db72d947a6e282dd7543bba14e">info</a> (String title, String text)</td></tr>
<tr class="separator:a4580f5db72d947a6e282dd7543bba14e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af74f060ff91795f8d384ae827761d1cd"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#af74f060ff91795f8d384ae827761d1cd">warn</a> (String title, String text)</td></tr>
<tr class="separator:af74f060ff91795f8d384ae827761d1cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a054118d06f48982829bf86b93cc0cfab"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_dialog.html#a054118d06f48982829bf86b93cc0cfab">confirm</a> (String title, String text)</td></tr>
<tr class="separator:a054118d06f48982829bf86b93cc0cfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>对话框。 对话框是一种特殊的窗口，大小和位置可以自由设置。</p>
<p>AWTK中的对话框可以是模态的，也可以是非模态的。</p>
<p>如果dialog有透明或半透效果则不支持窗口动画。</p>
<blockquote class="doxtable">
<p>由于浏览器中无法实现主循环嵌套，因此无法实现模态对话框。 </p>
</blockquote>
<p>如果希望自己写的AWTK应用程序可以在浏览器(包括各种小程序)中运行或演示， 请避免使用模态对话框。</p>
<p>对话框通常由对话框标题和对话框客户区两部分组成：</p>
<p>dialog_t是window\_base\_t的子类控件，window_base_t的函数均适用于dialog_t控件。</p>
<p>在xml中使用"dialog"标签创建对话框。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">dialog</span> <span class="keyword">anim_hint</span>=<span class="stringliteral">&quot;center_scale(duration=300)&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;160&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Dialog&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">dialog_title</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Hello AWTK&quot;</span> /&gt;</div>
<div class="line">*&lt;<span class="keywordtype">dialog_client</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;bottom&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;-30&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">label</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;center&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;middle:-20&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;200&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Are you ready?&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;quit&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;bottom:10&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;40%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;确定&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;quit&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;right:10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;bottom:10&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;40%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;取消&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">dialog_client</span>&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">dialog</span>&gt;</div>
</div><!-- fragment --><p>如果你不需要对话框的标题，可以这样写：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">dialog</span> <span class="keyword">anim_hint</span>=<span class="stringliteral">&quot;center_scale(duration=300)&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;160&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Dialog&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">label</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;center&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;middle:-20&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;200&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Are you ready?&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;quit&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;bottom:10&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;40%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;确定&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;quit&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;right:10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;bottom:10&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;40%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;取消&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">dialog</span>&gt;</div>
</div><!-- fragment --><p>打开非模态对话框时，其用法与普通窗口一样。打开非模态对话框时，还需要调用dialog_modal。</p>
<p>关闭模态对话框用dialog_quit</p>
<p>关闭非模态对话框用window_close。</p>
<blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/">dialog.xml</a></p>
<blockquote class="doxtable">
<p>完整C代码示例请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/dialog.c">非模态对话框</a></p>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/dialog_modal.c">模态对话框</a></p>
<p>可用通过style来设置控件的显示风格，如字体的大小和颜色等等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#606060&quot;</span> /&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L324">theme default</a> </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="aa4e0d881fdabeca969da9baecc583209"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4e0d881fdabeca969da9baecc583209">&#9670;&nbsp;</a></span>TDialog()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">awtk.TDialog.TDialog </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过nativeObj构造Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ab600248f7bf4697d03fdf3f00dcae6bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab600248f7bf4697d03fdf3f00dcae6bb">&#9670;&nbsp;</a></span>cast() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_dialog.html">TDialog</a> awtk.TDialog.cast </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>把nativeObj转换层Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

<p>重载 <a class="el" href="classawtk_1_1_t_window_base.html#a6b818850054d65efa888b0d788346616">awtk.TWindowBase</a> .</p>

</div>
</div>
<a id="aad51f882dcaf3eb37db8e7e10cf9ca15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad51f882dcaf3eb37db8e7e10cf9ca15">&#9670;&nbsp;</a></span>cast() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_dialog.html">TDialog</a> awtk.TDialog.cast </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换dialog对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>dialog对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>dialog对象。 </dd></dl>

<p>重载 <a class="el" href="classawtk_1_1_t_window_base.html#a071b93babeeec7c55c311bdf097fd2e8">awtk.TWindowBase</a> .</p>

</div>
</div>
<a id="a054118d06f48982829bf86b93cc0cfab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a054118d06f48982829bf86b93cc0cfab">&#9670;&nbsp;</a></span>confirm()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.confirm </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>显示『确认』对话框。</p>
<p>主题由dialog_confirm.xml文件决定。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>标题。 </td></tr>
    <tr><td class="paramname">text</td><td>文本内容。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示确认，否则表示取消。 </dd></dl>

</div>
</div>
<a id="aeb6bbc022b393387d96ef8492db99bc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb6bbc022b393387d96ef8492db99bc3">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TDialog.create </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建dialog对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>dialog对象。 </dd></dl>

</div>
</div>
<a id="a09f45b044edc5f4300f98a6ca6898ae1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09f45b044edc5f4300f98a6ca6898ae1">&#9670;&nbsp;</a></span>createSimple()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TDialog.createSimple </td>
          <td>(</td>
          <td class="paramtype">TWidget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建dialog对象，同时创建title/client。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>dialog对象。 </dd></dl>

</div>
</div>
<a id="a9fc62fe1eab528c18b10d6140085b22b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9fc62fe1eab528c18b10d6140085b22b">&#9670;&nbsp;</a></span>getClient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget awtk.TDialog.getClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取client控件。</p>
<dl class="section return"><dt>返回</dt><dd>client对象。 </dd></dl>

</div>
</div>
<a id="a7e6997c8ced06aad1f63b0f021844cfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e6997c8ced06aad1f63b0f021844cfd">&#9670;&nbsp;</a></span>getHighlight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.TDialog.getHighlight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>对话框高亮策略。</p>
<blockquote class="doxtable">
<p>请参考 <a href="https://github.com/zlgopen/awtk/blob/master/docs/dialog_highlight.md">对话框高亮策略</a> </p>
</blockquote>

</div>
</div>
<a id="a5a762db42dcaceb3ca0b0eb14a714f80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a762db42dcaceb3ca0b0eb14a714f80">&#9670;&nbsp;</a></span>getTitle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget awtk.TDialog.getTitle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取title控件。</p>
<dl class="section return"><dt>返回</dt><dd>title对象。 </dd></dl>

</div>
</div>
<a id="a4580f5db72d947a6e282dd7543bba14e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4580f5db72d947a6e282dd7543bba14e">&#9670;&nbsp;</a></span>info()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.info </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>显示『提示信息』对话框。</p>
<p>主题由dialog_info.xml文件决定。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>标题。 </td></tr>
    <tr><td class="paramname">text</td><td>文本内容。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a63f9cfcb94b459737eb7a6af21b3510f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63f9cfcb94b459737eb7a6af21b3510f">&#9670;&nbsp;</a></span>isModal()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.TDialog.isModal </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>检查对话框是否为模态对话框。</p>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示是模态对话框，否则表示不是。 </dd></dl>

</div>
</div>
<a id="a3bbe15f7435fec3a6dc747bef123070d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bbe15f7435fec3a6dc747bef123070d">&#9670;&nbsp;</a></span>isQuited()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.TDialog.isQuited </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>检查对话框是否已经退出模态。</p>
<dl class="section return"><dt>返回</dt><dd>返回TRUE表示已经退出，否则表示没有。 </dd></dl>

</div>
</div>
<a id="ac55fd4ece3cfc03be8e14abc57b86248"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac55fd4ece3cfc03be8e14abc57b86248">&#9670;&nbsp;</a></span>modal()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_dialog_quit_code.html">TDialogQuitCode</a> awtk.TDialog.modal </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>模态显示对话框。 dialog_modal返回后，dialog对象将在下一个idle函数中回收。 也就是在dialog_modal调用完成后仍然可以访问dialog中控件，直到本次事件结束。</p>
<dl class="section return"><dt>返回</dt><dd>返回退出吗。 </dd></dl>

</div>
</div>
<a id="adc8d72e861710f57909fa0802e54f594"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc8d72e861710f57909fa0802e54f594">&#9670;&nbsp;</a></span>open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static TWidget awtk.TDialog.open </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从资源文件中加载并创建Dialog对象。</p>
<p>本函数在ui_loader/ui_builder_default里实现。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>dialog的名称。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a17e9f44f1a1cd341ef54b1fd53731aa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17e9f44f1a1cd341ef54b1fd53731aa1">&#9670;&nbsp;</a></span>quit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.quit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>退出模态显示，关闭对话框。</p>
<blockquote class="doxtable">
<p>比如，在对话框中关闭按钮的事件处理函数中，调用本函数关闭对话框。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>退出码，作为dialog_modal的返回值(参考：dialog_quit_code_t)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8894dddeebf0bac173d3e03fcdd05cd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8894dddeebf0bac173d3e03fcdd05cd1">&#9670;&nbsp;</a></span>setTitle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.setTitle </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>title</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置对话框的标题文本。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>标题。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa247ffd5f1820806965223678c07a5f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa247ffd5f1820806965223678c07a5f0">&#9670;&nbsp;</a></span>toast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.toast </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>显示『短暂提示信息』对话框。</p>
<p>主题由dialog_toast.xml文件决定。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>文本内容。 </td></tr>
    <tr><td class="paramname">duration</td><td>显示时间(单位为毫秒)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af74f060ff91795f8d384ae827761d1cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af74f060ff91795f8d384ae827761d1cd">&#9670;&nbsp;</a></span>warn()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TDialog.warn </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>显示『警告』对话框。</p>
<p>主题由dialog_warn.xml文件决定。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>标题。 </td></tr>
    <tr><td class="paramname">text</td><td>文本内容。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TDialog.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
